package com.gb.demand.common.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author shenzhiwen
 * @since 2020-03-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("wemall_orderform")
@ApiModel(value="Orderform对象", description="订单表")
public class Orderform extends Model<Orderform> implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("addTime")
    private Date addTime;

    @TableField("deleteStatus")
    private Boolean deleteStatus;

    @TableField("finishTime")
    private Date finishTime;

    @ApiModelProperty(value = "商品的价格")
    private BigDecimal goodsAmount;

    @ApiModelProperty(value = "新点：")
    private String invoice;

    @ApiModelProperty(value = "【1=增值发票 2=普通发票  3 增值税普通 4增值税专用】")
    @TableField("invoiceType")
    private Integer invoiceType;

    private String msg;

    private String orderId;

    private Integer orderStatus;

    @TableField("payTime")
    private Date payTime;

    private String payMsg;

    private BigDecimal refund;

    private String refundType;

    @ApiModelProperty(value = "物流编码")
    @TableField("shipCode")
    private String shipCode;

    @TableField("shipTime")
    private Date shipTime;

    private BigDecimal shipPrice;

    @ApiModelProperty(value = "总价")
    @TableField("totalPrice")
    private BigDecimal totalPrice;

    private Long addrId;

    @ApiModelProperty(value = "支付方式的id 关联表payment")
    private Long paymentId;

    private Long storeId;

    private Long userId;

    private Boolean autoConfirmEmail;

    private Boolean autoConfirmSms;

    @ApiModelProperty(value = "运送方式 ：")
    private String transport;

    private String outOrderId;

    private Long ecId;

    private Long ciId;

    private String orderSellerIntro;

    @TableField("return_shipCode")
    private String returnShipcode;

    private Long returnEcId;

    private String returnContent;

    @TableField("return_shipTime")
    private Date returnShiptime;

    @ApiModelProperty(value = "订单类型 web还是weixin")
    private String orderType;

    @ApiModelProperty(value = "定单状态 '-2'=>'待提交''-1'=>'已删除','0'=>'取消的订单','1'=>'等待买家付款','2'=>'等待卖家发货','3'=>'等待买家确认收货','4'=>'订单完成','5'=>'退货中的订单','6'=>'退货成功','7'=>'等待审核订单','8'=>'等待收款订单','9'=>'b2b退货订单'")
    private Integer status;

    @ApiModelProperty(value = " 0无需审核（包括审核结束也变状态为0），1需一级审核；2需二级审核； 3需三级审核；4需四级审核；5需五级审核，")
    private Integer reviewState;

    @ApiModelProperty(value = "哪个部门下的单")
    private Long orderDepartment;

    @ApiModelProperty(value = "有退过货的订单才有这个字段，字段内容为退货订单的订单编号")
    private String tuihuoOrderId;

    @ApiModelProperty(value = "发货地址-对应表wemall_address中的主键id")
    private Integer fromAddressId;

    @ApiModelProperty(value = "订单一级审核意见")
    @TableField(value = "sh_level_1_opinion")
    private String shLevel1Opinion;

    @ApiModelProperty(value = "订单二级审核意见")
    @TableField(value = "sh_level_2_opinion")
    private String shLevel2Opinion;

    @ApiModelProperty(value = "订单三级审核意见")
    @TableField(value = "sh_level_3_opinion")
    private String shLevel3Opinion;

    @ApiModelProperty(value = "订单四级审核意见")
    @TableField(value = "sh_level_4_opinion")
    private String shLevel4Opinion;

    @ApiModelProperty(value = "订单五级审核意见")
    @TableField(value = "sh_level_5_opinion")
    private String shLevel5Opinion;

    @ApiModelProperty(value = "新点接口使用 交易流水号")
    @TableField("tradeNO")
    private String tradeNO;

    @ApiModelProperty(value = "是否已经开过票")
    private Boolean hasbilling;

    @ApiModelProperty(value = "客户名称，从南网过来的订单 以客户名称为筛选搜索条件")
    private String clientname;

    @ApiModelProperty(value = "销售类型 默认=正常 可以选 正常 类型2 类型3 类型4 类型5")
    private String saletype;

    @ApiModelProperty(value = "南网对接：申购单编号（采购专区购买时，申购单编号非空）")
    @TableField("applyId")
    private String applyId;

    @ApiModelProperty(value = "南网：开票申请号")
    @TableField("invoiceApplyNo")
    private String invoiceApplyNo;

    @ApiModelProperty(value = "彩招云 发票申请 发票号")
    private String czinvoiceId;

    @ApiModelProperty(value = "新南网退换货编号,中电建退货单号")
    @TableField("orderReturnId")
    private String orderReturnId;

    @ApiModelProperty(value = "公采云支付id")
    private Integer gongcaiyunPaymentId;

    @ApiModelProperty(value = "公采云：订单模式：1-协议价（默认）)；2-团购模式； 3-特惠模式; 4-阶梯价模式")
    private Integer mode;

    @ApiModelProperty(value = "公采云发票名称")
    private String invoiceTitle;

    private Integer isDistribute;
}
